#ifndef OMPT_SPECIFIC_H
#define OMPT_SPECIFIC_H

#include "libgomp.h"

void __ompt_team_assign_id(struct gomp_team *team, ompt_parallel_id_t ompt_pid);
void __ompt_thread_assign_wait_id(void *variable);

#if 0
void __ompt_lw_taskteam_init(ompt_lw_taskteam_t *lwt, struct gomp_thread *thr,
                             int gtid, microtask_t microtask,
                             ompt_parallel_id_t ompt_pid);

void __ompt_lw_taskteam_link(ompt_lw_taskteam_t *lwt,  struct gomp_thread *thr);

void __ompt_lw_taskteam_unlink(ompt_lw_taskteam_t *lwt, struct gomp_thread *thr);
#endif

ompt_task_id_t __ompt_task_id_new(int gtid);
ompt_parallel_id_t __ompt_parallel_id_new(int gtid);
ompt_parallel_id_t __get_ompt_parallel_id();
ompt_task_id_t __ompt_task_id_new(int gtid);

/* the wait_id assignment is needed in many, many macros - so define
 *  * a wrapper macro which can be a noop when it is not wanted.
 *   */
#if OMPT_SUPPORT
#define OMPT_THREAD_ASSIGN_WAIT_ID(DATA) __ompt_thread_assign_wait_id(DATA);
#else
#define OMPT_THREAD_ASSIGN_WAIT_ID(DATA)
#endif


inline struct gomp_thread *ompt_get_thread();
void *__ompt_get_idle_frame_internal(void);
ompt_thread_id_t __ompt_get_thread_id_internal(); 
ompt_state_t __ompt_get_state_internal(ompt_wait_id_t *ompt_wait_id);
void *__ompt_get_parallel_function_internal(int ancestor_level) ;
ompt_parallel_id_t __ompt_get_parallel_id_internal(int ancestor_level); 
void *__ompt_get_task_function_internal(int ancestor_level); 
ompt_task_id_t __ompt_get_task_id_internal(int ancestor_level);
ompt_frame_t *__ompt_get_task_frame_internal(int ancestor_level);
const char *__ompt_get_runtime_version_internal();

#endif
